package com.cdn.nodes.api;

import com.cdn.common.core.constant.ServiceNameConstants;
import com.cdn.common.core.domain.R;
import com.cdn.nodes.api.factory.RemoteClusterFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;


@FeignClient(contextId = "remoteIpService",
        value = ServiceNameConstants.NODE_SERVICE,
        fallbackFactory = RemoteClusterFallbackFactory.class)
public interface RemoteIpService {


    /**
     * 根据节点Id查询ip地址
     */
    @GetMapping("/ip/getIpIdByNodeId/{nodeId}")
    public R<String> getIpIdByNodeId(@PathVariable("nodeId") Long nodeId);

}
